//
//  UIImage.swift
//  SelectPhotos
//
//  Created by 李锡鹏 on 2017/6/24.
//  Copyright © 2017年 李锡鹏. All rights reserved.
//

import UIKit
extension UIImage {
    func reSize(w:CGFloat,h:CGFloat) -> UIImage {
        let rect = CGRect(x: 0, y: 0, width: w, height: h)
        UIGraphicsBeginImageContext(rect.size)
        self.draw(in: rect)
         let img = UIGraphicsGetImageFromCurrentImageContext()
        UIGraphicsEndImageContext()
        return img!
    }
}
